#ifndef __OAL_TYPES_H__
#define __OAL_TYPES_H__

#include "oaldef.h"
#include <assert.h>
#include <oal.h>
OAL_DECLS_BEGIN




#if  defined(WIN32) || defined(_WIN32)
	#define OAL_OS_WINDOWS
#elif defined(linux)
	#define OAL_OS_LINUX
#elif
	#error unsuported system type!!!
#endif

#ifdef OAL_OS_WINDOWS
//如果要编译成windos dll动态库，则定义此宏
//否则注释掉该定义
#define OAL_WIN_DLL 

#endif


#define OAL_TRUE 	1
#define OAL_FALSE 	0

#define OAL_ARRAY_SIZE(a) 		(sizeof(a)/sizeof(a[0]))


#define OAL_STR_EMPTY(s) 		(s[0]=='\0')

#ifdef OAL_WIN_DLL
	#define OAL_DECL(type) 		_declspec(dllexport) type
#else
	#define OAL_DECL(type) 		type
#endif
#define OAL_INLINE(type) 	static inline type

#define oal_malloc(size) 		mget(size)
#define oal_calloc(count,size) 	mgetz(count*size)
#define oal_free(p)				mput(p)

#define OAL_MALLOC_T(type) ((type *)oal_malloc(sizeof(type)))


#define OAL_ASSERT(exp) assert(exp)

OAL_DECLS_END


#endif